1. Field of the Invention
The present invention relates to a network printer having a function for receiving print job data from a communication network and printing the data.
The present application is based on Japanese Patent Application No. Hei. 10-292437, which is incorporated herein by reference.
2. Description of the Related Art
FIG. 1 shows an arrangement of a conventional network printer.
A printer 1 normally includes a parallel interface (I/F) 11 so that the printer can be directly connected to a host computer 3, the number of which is usually one, through a dedicated cable 7 in one to one correspondence by means of the parallel interface 11. In the case where the printer 1 is commonly used by a plurality of host computers in a company or the like, the printer 1 is coupled to a communication network 9 such as a local area network (LAN) within the company. In this case, a network interface board 5 as an optional part is additionally installed within the printer 1, whereby the communication network 9 is coupled to the printer 1 through the network interface board 5.
The network interface board 5 includes its own central processing unit (CPU) 23 which operates a synchronously with a CPU 17 of the printer 1. The CPU 23 executes the communication protocol thereby to extract print job data from a packet received through the communication network 9 to temporarily store the print job data in a dynamic random access memory (DRAM) 25 on the board 5 and thereafter to send the print job data thus stored to the printer 1.
As described above, the conventional printer requires the network interface board 5 in the case of coupling the printer to the network. However, the network interface board 5 includes the own CPU 23 and the DRAM 25, and further the CPU 23 operates at a high speed and the DRAM 25 has a large capacity in order to attain the high-performance, and so they are expensive consequentially. Thus, the network interface board is very expensive.
In the case of performing the two-way communications between the printer and the host computer, the complicated protocol corresponding to the two-way communications is required at two portions, that is a portion between the host computer 3 and the network interface board 5 and a portion between the network interface board 5 and the main body of the printer. Further, due to the presence of the network interface board 5, an amount of data to be copied between memories becomes large. As a result, the performance of the printer degrades, which results in a serious problem at the time of developing a high-speed network printer.
Accordingly, an object of the present invention is to provide a cheaper network printer.
Another object of the present invention is to provide a network printer which does not require a network interface board.
A still another object of the present invention is to provide a high-speed network printer.
A still another object of the present invention is to provide a network printer which can perform the network communication and the processing of print job without any, trouble by using a single CPU.
In order to achieve the aforesaid object, the network printer according to the present invention includes a network interface, coupled to the communication network, for receiving a packet from the communication network, a CPU, a RAM used by the CPU and having a print data buffer for storing print job data, a print image generation means for generating image data on a basis of a result of interpretation of the print job data performed by the CPU, and a print mechanism for printing image on a recording medium on a basis of the image data.
The CPU includes: (1) a communication processing means which discriminates a communication protocol used in the communication network from a packet received by the network interface circuit, extracts print job data from the received packet in accordance with the discriminated communication protocol and writes the extracted print job data into the print data buffer, and then returns a first response representing reception of the packet toward the communication network, (2) a language processing means which interprets the print job data within the print data buffer, and (3) a watch dog timer means which, in a case where the discriminated communication protocol is such a kind of protocol that a transmission side disconnects a connection to a receiving side when the transmission side does not receive a response from the receiving side within a limit time period after transmission of the packet, returns a predetermined second response within the limit time period toward the communication network in place of the communication processing means when the communication processing means does not return a response representing reception of the packet within the limit time period.
According to such a network printer, since the single CPU performs both the communication processing with the network and the language processing of the received print job data, it is not necessary to provide a network interface board with its own CPU. Thus, the network printer can be made cheap and the high-speed network printer can be easily realized.
In the case of performing both the communication processing and the language processing by using a single CPU, if the language processing can not be proceeded due to the shortage of the capacity of the RAM or the occurrence of error and a vacant area of the print data buffer becomes zero, the communication processing is also blocked, whereby a response can not be returned to the transmission originator on the network. In this state, in the case of using some kind of communication protocol, the transmission originator determines that the receiving side is in a failure state thereby to disconnect the communication line if a response is not returned from the receiving side within the predetermined limit time period. In such a case, even if the communication processing means is released from the blocked state later, the receiving side can not receive a succeeding packet from the transmission originator, so that the complete printing operation can not be performed. In contrast, according to the network printer of the present invention, since the watch dog timer means returns a suitable response (for example, a response representing a busy state) to the transmission originator in place of the communication processing means even if the communication processing means is blocked, the transmission originator does not disconnect the connection. Thus, when the communication processing means is released from the blocked state later, the receiving side can receive a succeeding packet from the transmission originator and continue the printing processing.
According to a preferred embodiment, the watch dog timer means is activated substantially when the network interface circuit receives the packet to count during a predetermined period shorter than the limit time period so long as the communication processing means does not return a response, and returns a response representing a busy state or the like due to time-out of the count.
According to a preferred embodiment, the communication processing means activates the watch dog timer means when the communication processing means discriminates the communication protocol to determine that the discriminated communication protocol is such a predetermined kind of protocol that the transmission side disconnects a connection to the receiving side when the transmission side does not receive a response from the receiving side within the limit time period.
According to a preferred embodiment, the RAM includes a network work memory for storing the packet in addition to the print data buffer, and the CPU is adapted to, when the network interface circuit receives the packet, activate the interruption processing thereby to write the received packet into the network work memory. Further, the communication processing means, the language processing means and the watch dog timer (WDT) means are executed as tasks (communication task, language task and WDT task) of the CPU, respectively. Furthermore, the aforesaid image generation means is also executed as a task (print task) of the CPU.
According to a preferred embodiment, of the communication task, the language task and the print task, the print task is provided with a highest priority level, the communication task is provided with a secondary priority level, and the language task is provided with a lowest priority level. The WDT task is executed in association with the communication task.